package com.zzz.demo.controller;

import com.zzz.demo.entity.User;
import com.zzz.demo.service.UserServiceClient;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author ZZZ
 * @version 1.0
 * @date 2018/9/26 026
 */


@ApiModel(value = "用户处理类")
@RestController
@RequestMapping("/testUser")
public class UserController {

    @Autowired
    private UserServiceClient userService;

    @ApiOperation(value = "用户查询接口",tags = {"用户管理"})
    @GetMapping("list")
    public List<User> listUser() {
        return userService.getAllUser();
    }
}
